//package com.yanfei.zero.infrastructure.config;
//
//import com.alipay.api.AlipayApiException;
//import com.alipay.api.AlipayClient;
//import com.alipay.api.DefaultAlipayClient;
//import com.alipay.api.request.AlipayTradePagePayRequest;
//
//public class AlipayConfig {
//    public static AlipayClient alipayClient;
//
//    static {
////        String serverUrl = "https://openapi.alipay.com/gateway.do";
//        String serverUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";
//        String appId = "9021000135668158";
//        String privateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC2yYI0GPWZCYc17DQYQDHj8Lr4hsePxU054ImaxIZvemEyKoIgiG0/ZeScQyFyihltWaxvj+DLtUtPJJggbLEUQfbBVyf1vC5pX8YRvOhrCjLCUjBJ0LSk5oRgxWdV9bBMR/DYnrL5TiuLJC4PmgJjTYBXpFDLJg3s/m86+GL+tWD+k6bHfQzC6qKcdQNn5fubmNSAY83Zi3v/vJdlqpTK7D7+gfqW+vUFRT0dPGQNJiSH8uPKWf1/pj8u7ZFokPJOBVp7djfD1p51UuGvDPFYzIS9CSl6pB8HrXamdujaMN0pZrediwLKmVZ1VEIL/0ZAeIj9jDdVsZ5dUfBrplM3AgMBAAECggEAWDC5RXGVbZUPS5D/QYQXjiajzy0YM+G59ObE/Ys8YaTmKFIiHpg0PZZnyo0JIj5HLl9Jtznv99ks0K6TR3GprmB1MatfeEynB+hRpFVEvgBZpTAKZFLyFW2zCQ21Yd/8g5FiPuGy8F4q3CNEpfpklIzcE20QHjPqHCJWgFk/SixeFjEw16WBEv5eHnIS2Nk/7TCw/GAp4o6g+ZypG+9SKxO4iN7knMDAi8DfPEPX3CywO0uqUGRsY3/hs7ULFeCBC8mFhhNq8QIC8u/EEJnvffgPg5itc3A/E3ZxVWOAmaCZbGgZJt8pZ3Vm/PWUk+QrbW/XQdccZS4uOLwR0C1KAQKBgQD5esK6Tb7LIYExsu5H2YsCQaJPxZxniOO5KPp9VaoaSZrJDjBhLL7idhm0mHsdj49icB496h/Wg3dXoP8GTtXBjkRTg8QyTqVugd8hjlHCEGBSBpIYmPj6krUpy1FurXMt009Bcot+GOIg+wLnvJuMBFi3SMilcE3fpJjeoPUA9wKBgQC7kIRG+9AgdvXRs/44ok2wqSNiyC1DYemBa41TR/3GCfc9jWvBBjAMHFKpehNWOrXYFRQsZqIh/50hwLiRbJtM44zxNVkVxrJFxT/xep1TS5mW2T6cdUN9zuwFICaxFwBOweM2cYd3bX203Ay/9A8ctAzeWthgBX6IKZCJKMbvwQKBgBMGn68hmrlXFsk5gh6MoqNLaht3UJQ8xlEqpN/GFrDmiB1pLZtblDslEpTJRCpe9mplboj+P+tWH1XZe1l5zadzOBa+Z8oGYWtqECA5AFcydIYM5jtl/ybs5VAIp28vXydRhCvTlnvJXgVx3yjZI2usMS/ZJyQmymmR3e6si8LFAoGAQQ4oAyLWFlyMeHawp14MCkkv/9Qkdumf/waZ1xfyOl08hvnlNOb7hUfRl/zCdjcY2WC+RYQ3mgk5q/pXSgFcgDewq/zv8DChprd6rTv1E232UK77G3NEvH8nt8NmCChNMAPp1flcnhy47CEivvVcxHzitcDWqb9eGsYn3prpHUECgYBX7+8uDJ61RirWOdraP9dvvoU2uyXYoOLUL6zYmYwMPiC1etIGDTA2SVJyrz2xVMDeojFeJwh9asmsLP62ELgCzKTGnGEoku/wlBoCHdXwB7k8KThnb2eQD5VbAomg8RfM2x4QDZy0k5t+bLxsLOYPnnTUkdQyssNeb3L99kUpHg==";//你的应用私钥
//        String format = "json";
//        String charset = "UTF-8";
//        String signType = "RSA2";
//        String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoDNnyZ0tpKl4o+61U+XFOe8YD82gIPWyeQkhCQ4tvlmGFu7QuK+35uKpw4f8X0aHxuzcXoTibhiO5q9cqmIwd8XVLZ3e9arMgtRh5pHg0bKxACZEL3MoTXywkEH5tWqKtHEwwtmNUqH8FTYjJ0vau63UE+GHD3D9FsReNlASHf0ywQtyjyomMW/HmCKgDwhDyjmdgXOcCsJVWltDJ/wulgJ4yxYRsQ7GT8Rgx/FneGgcgl++8o3UmtXYCLSX/JC8S/H7V1CbMXFuGAAsJv9gyQaakGYmPjzLnbXO0YtMLtT5cPWYfjaBg5EijA5ocwIeHxuj01wrvLDYcM+itQ3eJwIDAQAB";
//
//        alipayClient = new DefaultAlipayClient(serverUrl, appId, privateKey, format, charset, alipayPublicKey, signType);
//    }
//    public static void main(String[] args) {
////        AlipayClient alipayClient = AlipayConfig.alipayClient;
//
//        // 创建API对应的request
//        AlipayTradePagePayRequest alipayRequest = new AlipayTradePagePayRequest();
//        alipayRequest.setReturnUrl("http://example.com/return");
//        alipayRequest.setNotifyUrl("http://example.com/notify");
//
//        // 填充业务参数
//        alipayRequest.setBizContent("{" +
//                "\"out_trade_no\":\"20150320010101001\"," +
//                "\"product_code\":\"FAST_INSTANT_TRADE_PAY\"," +
//                "\"total_amount\":88.88," +
//                "\"subject\":\"Iphone6 16G\"," +
//                "\"body\":\"Iphone6 16G\"," +
//                "\"passback_params\":\"merchantBizType%3d3C%26merchantBizNo%3d2016010101111\"," +
//                "\"extend_params\":{" +
//                "\"sys_service_provider_id\":\"2088511833207846\"" +
//                "}" +
//                "}");
//
//        // 请求
//        String result = "";
//        try {
//            result = alipayClient.pageExecute(alipayRequest).getBody();
//        } catch (AlipayApiException e) {
//            e.printStackTrace();
//        }
//
//        // 输出表单
//        System.out.println(result);
//    }
//
//
//}